fileType
Type
property
Summary
Specifies the creator and file type for any non- stack files a handler creates on a Mac OS or OS X system.
Syntax
set the fileType to <creator> & <type>
Description
Use the fileType property to ensure that files that a standalone application creates are recognized by the operating system as belonging to the standalone.
The file type and creator signature are case-sensitive.
When a file is saved on a Mac OS or OS X system, a 4-character file type and 4-character creator signature are saved with it. The creator signature specifies which application owns the file. The application determines the file format from the file type; the type is also used to determine which applications (other than the owner) can work with the file.
The fileType property is used to set the file type and creator of files created by the open file command and of files created putting data into a file, binfile, or resfile URL that doesn't yet exist. (To specify the file type and creator for stack files your application creates with the save command, use the stackFileType property instead.)
This property has no effect on Unix and Windows systems.
To avoid conflicts with other applications, register any new creator signatures with Apple Computer if you plan to distribute a stack or standalone application that uses this property. Apple maintains a registry of creator signatures on its web site at http://developer.apple.com/dev/cftype/.
Examples
set the fileType to "ttxtTEXT" -- text file owned by SimpleText app
Related
function: files
glossary: property, OS X, handler, type signature, stack file, case-sensitive, Mac OS, standalone application, creator signature, command
keyword: file, characters, string, character, binfile, URL, resfile
object: stack
property: filename, stackFileType
command: rename, save, open file
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
ios
Platforms
desktop
server
mobile